package davey.wu.hamcrest.expected;

import org.hamcrest.Matcher;
import org.hamcrest.number.IsCloseTo;
import davey.wu.hamcrest.expected.interdef.DoubleExpectedOp;

public class DoubleExpected extends NumberExpected<Double, DoubleExpectedOp> implements DoubleExpectedOp {

	public DoubleExpected(Class<Double> clazT, Class<DoubleExpectedOp> clazE) {
		super(clazT, clazE);
	}

	public DoubleExpectedOp closeTo(Double value, Double range) {
		Matcher<Double> matcher = IsCloseTo.closeTo(value, range);
		return super.link(matcher);
	}

	@Override
	protected DoubleExpected getInstance() {
		return new DoubleExpected(Double.class, DoubleExpectedOp.class);
	}
}
